package org.jeecg.modules.ywPalletEnter.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.constant.CommonConstant;
import org.jeecg.modules.ywPalletEnter.entity.YwPalletEnterDetail;
import org.jeecg.modules.ywPalletEnter.mapper.YwPalletEnterDetailMapper;
import org.jeecg.modules.ywPalletEnter.service.IYwPalletEnterDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 托盘入库-详情
 * @Author: jeecg-boot
 * @Date: 2024-08-27
 * @Version: V1.0
 */
@Service
public class YwPalletEnterDetailServiceImpl extends ServiceImpl<YwPalletEnterDetailMapper, YwPalletEnterDetail> implements IYwPalletEnterDetailService {

    @Resource
    private YwPalletEnterDetailMapper ywPalletEnterDetailMapper;

    @Override
    public List<YwPalletEnterDetail> selectByMainId(String mainId) {
        return ywPalletEnterDetailMapper.selectByMainId(mainId);
    }

    @Override
    public List<YwPalletEnterDetail> selectList(String id) {
        QueryWrapper<YwPalletEnterDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("enter_id", id);
        queryWrapper.eq("status", CommonConstant.StatusEnum.YES.getCode());
        return this.ywPalletEnterDetailMapper.selectList(queryWrapper);
    }

}
